<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Services\ReportService;
use Illuminate\Http\Request;

class ReportController extends Controller
{
    private $reportService;
    public function __construct(ReportService $reportService)
    {
        $this->reportService = $reportService;
    }
    public function reportList(Request $request)
    {
        $params = $request->input();
        $result = $this->reportService->reportList($params);
        return $this->responseSuccess($result);
    }


    public function reportStatusUpdate(Request $request)
    {
        $params = $request->input();
        $result = $this->reportService->reportStatusUpdate($params);
        if($result)
            return $this->responseSuccess($result);
        else
            return $this->responseError(400);
    }

    public function reportDel(Request $request)
    {
        $params = $request->input();
        $result = $this->reportService->reportDel($params);
        if($result)
            return $this->responseSuccess($result);
        else
            return $this->responseError(400);
    }
}
